package com.todo.sight.infrastructure.repository;


import com.todo.common.common.entity.response.page.PageResult;
import com.todo.sight.infrastructure.entity.condition.SightPoiCondition;
import com.todo.sight.infrastructure.entity.po.SightPoiPO;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * (SightPoi)表服务接口
 *
 * @author zhangwenxiang
 * @since 2024-03-04 21:10:04
 */
public interface SightPoiRepository {

    /**
     * 多条件查询POI列表
     *
     * @param sightPoiCondition
     * @return
     */
    PageResult<SightPoiPO> querySightPoiByCondition(SightPoiCondition sightPoiCondition);

    /**
     * 根据条件查询POI数量
     *
     * @param sightPoiCondition
     * @return
     */
    Long queryCountByCondition(SightPoiCondition sightPoiCondition);

    /**
     * 根据id查询POI信息
     *
     * @param id
     * @return
     */
    SightPoiPO querySightPoiPOById(Long id);

    /**
     * 新增POI数据
     *
     * @param sightPoiPO
     * @return
     */
    Boolean insertSightPoiPO(SightPoiPO sightPoiPO);

    /**
     * 批量新增POI数据
     *
     * @param sightPoiPOList
     * @return 保存成功数据id列表
     */
    List<Long> insertSightPoiPOBatch(List<SightPoiPO> sightPoiPOList);

    /**
     * 根据主键更新POI信息
     *
     * @param sightPoiPO
     * @return
     */
    Boolean updateSightPoiPOById(SightPoiPO sightPoiPO);

    /**
     * 根据主键删除POI信息
     *
     * @param id
     * @return
     */
    Boolean removeSightPoiPOById(Long id);

    /**
     * 根据名称和横纵坐标查询POI信息
     *
     * @param name
     * @param lon
     * @param lat
     * @return
     */
    SightPoiPO queryPoiByCoordinate(String name, BigDecimal lon, BigDecimal lat);

    /**
     * 根据名称查询对应景点信息
     *
     * @param name
     * @param city
     * @return
     */
    List<SightPoiPO> querySightPoiByName(@NotNull String name, String city);

    /**
     * 根据id列表查询对应景点信息
     * @param poiIdList
     * @return
     */
    List<SightPoiPO> querySightPoiByIdList(List<Long> poiIdList);
}
